function [rmse_value,mae_value,error_ratio,recovery_loss] = rmse_calculate(tensor_org, tensor_train,arry)
tensor_org=double(tensor_org);
tensor_train=double(tensor_train);
[x,y,z]=size(tensor_org);
[x1,y1]=size(arry);
numarry=y1;
num=x*y*z;
cal_tensor=tensor_org-tensor_train;
square_cal_tensor=cal_tensor.^2;
square_tensor_org=tensor_org.^2;
% caiyang_cal_tensor=zeors(x,y,z);
% caiyang_cal_tensor(arry)=cal_tensor(arry);

%recovery_loss
caiyang_square_cal_tensor=zeros(x,y,z);
caiyang_square_cal_tensor(arry)=square_cal_tensor(arry);
recovery_loss=(sum(caiyang_square_cal_tensor(:)));

%error_ratio
feicaiyang_square_cal_tensor_cal=ones(x,y,z);
feicaiyang_square_cal_tensor_cal(arry)=0;
feicaiyang_square_cal_tensor=feicaiyang_square_cal_tensor_cal.*square_cal_tensor;
feicaiyang_square_tensor_org=square_tensor_org.*feicaiyang_square_cal_tensor_cal;
error_ratio=sum(feicaiyang_square_cal_tensor(:))./sum(feicaiyang_square_tensor_org(:));

%mae_value
cal_tensor_sum=abs(cal_tensor);
mae_value=sum(cal_tensor_sum(:))./num;

%rmse_value
square_cal_tensor_sum=abs(square_cal_tensor);
rmse_value=sum(square_cal_tensor_sum(:))./num;

% org_fvalue = norm(matrix_org, 'fro' );
% rmse_value=sum(sum(abs(matrix_org-matrix_train)))./num;